Benjamin Otte [Sat, 20 Nov 2021 15:59:50 +0000 (16:59 +0100)]
sizerequest: Change critical message
Printing the affected widget leads people to assume that it is to blame
for the error. However, the widget is the object the function is being
called on, not the caller. And the caller is doing it wrong.
Usually the caller is the parent widget, so we could print that one, but
it's only usually, it can be an issue propagating from a grandparent and
it doesn't tell you from where the function is called (allocation or
measuring), so you need a debugger anyway.
Benjamin Otte [Sat, 20 Nov 2021 04:42:20 +0000 (05:42 +0100)]
stack: Make sure to not under-measure children
When the stack is homogeneous in only one direction, the other direction
may produce min sizes to small for all children. Make sure to query at
least the min size for those.
Benjamin Otte [Fri, 19 Nov 2021 20:58:09 +0000 (21:58 +0100)]
sizerequest: Add a critical when for_size is too small
It's not expensive to check it because we'll cache the dfault size
request anyway, and people do it wrong a lot.
As a bonus, don't do any return_if_fail(), just use the min size
instead.
Chun-wei Fan [Tue, 6 Jul 2021 09:15:39 +0000 (17:15 +0800)]
GDK-Win32: Fix AeroSnap indicator and positioning
Ensure that we take the DPI scaling into account so that surfaces will
be placed at their correct positions upon an AeroSnap operation on HiDPI
displays.
Also, use the X coordinate of the surface as-is during snap up so that
we do not inadvertently move the surface to the very left. Also fix the
AeroSnap indicator drawing for snap up so that it is drawn at the
correct places.
Since we are updating these functions, make the old GdkWindow-era
variable names to match better the names we use nowadays.
Matthias Clasen [Tue, 16 Nov 2021 23:45:34 +0000 (18:45 -0500)]
Don't spam debug messages into TAP output
g_log_writer_standard_streams just puts all the logs
out onto stderr and stdout if we don't stop it. Pango
recently grew a bunch of g_debug calls, and those were
now showing up, making all the reftests fail.
Naïm Favier [Tue, 16 Nov 2021 11:53:38 +0000 (12:53 +0100)]
composetable: invalidate cache based on symlink mtime too
When the compose file is a symbolic link, take the link itself's
modification time into account (in addition to its target's) in
determining whether to invalidate the compose cache.
This is useful e.g. on NixOS systems where the compose file might point
to a store path with an irrelevant modification time, and we want the
cache to expire when the symlink itself changes.
Carlos Garnacho [Tue, 16 Nov 2021 09:52:35 +0000 (10:52 +0100)]
gtkmain: Disable implicit grab active state on CROSSING_GRAB leave events
This grab-induced crossing event may come from outer means while there are
buttons pressed (e.g. WM window drags/resizes in X11), the implicit active
state should be undone in that situation.
Also, separate the handling of GDK_LEAVE_NOTIFY, as it's fundamentally
different from GDK_TOUCH_END/CANCEL handling.
Carlos Garnacho [Mon, 15 Nov 2021 22:45:47 +0000 (23:45 +0100)]
gtkgesture: Do not cancel gesture when setting DENIED state
Touchpoint state and tracking are tangential, this is mixing up both.
This change was added in the fixes for
https://gitlab.gnome.org/GNOME/gtk/-/issues/3016 but is now unnecessary.
Carlos Garnacho [Mon, 15 Nov 2021 22:39:48 +0000 (23:39 +0100)]
gtkwidget: Do not check event sequence state before cancelling gesture
The sequence should be cancelled from the gesture despite its current state.
Also, there was a piece of pointer emulation that was not dropped here,
maybe breaking things further for the pointer emulated touchpoint.
Emmanuele Bassi [Mon, 15 Nov 2021 15:31:35 +0000 (15:31 +0000)]
docs: Enable OpenSearch on our references
By adding the `docs_url` key in the project configuration file,
gi-docgen will generate an OpenSearch XML file, which allows to add
docs.gtk.org/<reference> as a "search engine" in web browsers.
Benjamin Otte [Mon, 15 Nov 2021 13:58:52 +0000 (14:58 +0100)]
build: Actually use the extra warnings
I forgot to remove the '-Werror=' part from all the extra warnings, so
the warning/error flags we generated were '-Werror=-Werror=warning-flag'
or 'W-Werror=warning-flag' - but because our compiler flag checking
infrastructure works so nicely, it just ignored these obviously wrong
flags.
Benjamin Otte [Thu, 11 Nov 2021 04:21:43 +0000 (05:21 +0100)]
label: Don't do more work than necessary
We only want to determine the size pixel-exact, not pango-unit-exact, so
don't spend lots of time wondering if text is half a pixel or a quarter
pixel wider.
Benjamin Otte [Wed, 10 Nov 2021 19:01:36 +0000 (20:01 +0100)]
build: Don't use any -Werror in release builds
Do kep them for debug and debugoptimized builds though.
Keeping -Werror flags in release builds causes issues with forward
compatibility, when new compiler releases or different toolchains
suddenly cause those warnings to be emitted during compilation.
While we certainly want those issues to be investigated and fixed, they
should not prevent anyone from building GTK until they are.
Matthias Clasen [Tue, 9 Nov 2021 20:25:48 +0000 (15:25 -0500)]
flatpak: Add pango to manifest
We have a tight coupling with pango, whenever new
pango API appears, our build usually breaks. So
just make our flatpak manifests build pango from git.
Benjamin Otte [Tue, 9 Nov 2021 02:28:29 +0000 (03:28 +0100)]
boxlayout: Fix broken min-size-for-opposite-size
Assume a vbox with 2 wrapping labels saying
Hello World
Hi Ho
being measured for their minimum width for 3 rows of text.
This should be layouted like
Hello
World
Hi Ho
and measured accordingly.
However, previously this was layouted as
Hello World
Hi Ho
with 1.5 lines being assigned to both labels.
That will obviously not compute the above wrapping which clearly
results in a smaller min width.